home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / misc / vinced / include / vnc / owner.h < prev    next >
C/C++ Source or Header  |  1999-04-19  |  7KB  |  165 lines

  1. #ifndef VNC_OWNER_H
  2. #define VNC_OWNER_H
  3. /*********************************************************
  4.  ** ViNCEd                                              **
  5.  ** a DOS - window handler                              **
  6.  **                                                     **
  7.  ** © 1991-98 THOR-Software inc.                        **
  8.  ** Version 3.60                                        **
  9.  **                                                     **
  10.  ** program version 3.60 22 Aug 1998    THOR            **
  11.  **                                                     **
  12.  ** ViNCEd Owner Definitions                            **
  13.  **-----------------------------------------------------**
  14.  **                                                     **
  15.  ** all use at your own risk,etc.,etc.                  **
  16.  **                                                     **
  17.  ** Everything declared as "reserved" or                **
  18.  ** "not used" is NOT free for your use,                **
  19.  ** it will propably used in a later release.           **
  20.  ** All FREE entries are free for public                **
  21.  ** use and are, if not otherwise noticed,              **
  22.  ** initialized as ZERO                                 **
  23.  *********************************************************/
  24.  
  25. #ifndef EXEC_TYPES_H
  26. #include <exec/types.h>
  27. #endif
  28.  
  29. #ifndef EXEC_LISTS_H
  30. #include <exec/lists.h>
  31. #endif
  32.  
  33. #ifndef EXEC_PORTS_H
  34. #include <exec/ports.h>
  35. #endif
  36.  
  37. #ifndef EXEC_TASKS_H
  38. #include <exec/tasks.h>
  39. #endif
  40.  
  41. #ifndef DEVICES_TIMER_H
  42. #include <devices/timer.h>
  43. #endif
  44.  
  45. #ifndef DOS_DOS_H
  46. #include <dos/dos.h>
  47. #endif
  48.  
  49. #ifndef DOS_DOSEXTENS_H
  50. #include <dos/dosextens.h>
  51. #endif
  52.  
  53. #ifndef VNC_WINDOW_H
  54. #include <vnc/window.h>
  55. #endif
  56.  
  57. #ifndef VNC_VNCBASE_H
  58. #include <vnc/vncbase.h>
  59. #endif
  60.  
  61. /* The next one is a ViNCEd owner, i.e. the structure assosiated
  62.    to all processes using the same named console for printing/reading.
  63.    Owners setup the foreground/background mechanism, see the guide. */
  64.  
  65. struct ViOwner {
  66.         struct MsgPort          vow_DOSPort;    /* put messages here */
  67.                                                 /* name is the name of the
  68.                                                    console associated to it*/
  69.         UWORD                   vow_UseCount;   /* counts # of times opened*/
  70.         struct List             vow_ReceivedOutNodes;
  71.                                                 /* keeps outnodes, i.e. this
  72.                                                    establishes the output
  73.                                                    buffer */
  74.         UWORD                   vow_OwnerMode;   /* console mode of
  75.                                                     this owner */
  76.         struct MsgPort         *vow_BreakPort;  /* send ^C where ?*/
  77.         ULONG                   vow_RequestedEvents;
  78.                                                 /* send which
  79.                                                    input events ?*/
  80.         UWORD                   vow_OutSize;    /* size of the output
  81.                                                    buffer */
  82.  
  83.         UWORD                   vow_ReadPointer;/* file pointer in output
  84.                                                    buffer, set with SEEK */
  85.  
  86.         struct timerequest      vow_TimerIO;    /* used by WaitForChar */
  87.         struct Message         *vow_messagedummy; /* internal use only */
  88.         struct MsgPort         *vow_OwnerPort;  /* pointer to
  89.                                                    this structure */
  90.         ULONG                   vow_Type;       /* always A_Timer.
  91.                                                    This fakes a DOSPacket */
  92.         ULONG                   vow_resultdummy;/* another dummy for faking */
  93.  
  94.         struct MsgPort          vow_EventPort;  /* for incomming events */
  95.  
  96.         UWORD                   vow_WaitingReads; /* counts number of read
  97.                                                      requests */
  98.  
  99.         ULONG                   vow_ParseFlags;   /* see below */
  100.         struct MsgPort         *vow_ReadPort;   /* last reading port, invalid
  101.                                                    if counter=0.
  102.                                                    Used for TAB expansion */
  103.         struct MsgPort         *vow_WritePort;  /* last port writing here.
  104.                                                    Used for ^C */
  105.         struct MsgPort         *vow_PendingPort; /* suspended task in ^Z */
  106.  
  107.         UWORD                   vow_IOBlockNest;   /* if <>0, all I/O by this
  108.                                                       owner is suspended */
  109.         UWORD                   vow_WaitingWrites; /* suspended write
  110.                                                       requests */
  111.  
  112.         struct MinList          vow_SubOwnerList;  /* List of subowners */
  113.  
  114.         struct DosPacket       *vow_WaitPacket;    /* WaitForChar packet */
  115.  
  116.         /* private data beyond this point... do not touch */
  117. };
  118.  
  119. /* The sub-owner structure is allocated once per stream (unlike the
  120.    owner, which is allocated once per named console).
  121.    This is what you find in your file handle */
  122.  
  123. struct SubOwner {
  124.         struct SubOwner         *vsow_Next;
  125.         struct SubOwner         *vsow_Pred;     /* linked list */
  126.         UBYTE                    vsow_Type;
  127.         UBYTE                    vsow_Pri;
  128.         char                    *vsow_Name;     /* points to name of
  129.                                                    the owner, i.e.
  130.                                                    console name */
  131.         UWORD                    vsow_cludgefill;
  132.         struct Owner            *vsow_Owner;    /* subowner of which
  133.                                                    owner */
  134.         struct FileHandle       *vsow_Stream;   /* no BPTR! Stream
  135.                                                    of this SubOwner */
  136.         struct ViNCWindow       *vsow_Window;   /* pointer to main
  137.                                                    structure */
  138.         struct VNCBase          *vsow_VNCLibBase;
  139. };
  140.  
  141. /* flags defined in vow_ParseFlags */
  142.  
  143. /* something saved back ?*/
  144. #define VOW_SAVEDBACK_BIT       0
  145. #define VOW_SAVEDBACK_MASK      (1L<<0)
  146.  
  147. /* parsing in ESC or CSI ?*/
  148. #define VOW_SEPARATEPARSE_BIT   8
  149. #define VOW_SEPARATEPARSE_MASK  (1L<<8)
  150.  
  151. /* special character set codes */
  152. #define VOW_FOUNDSS2_BIT        12
  153. #define VOW_FOUNDSS3_MASK       (1L<<12)
  154.  
  155. /* got new read request, title must be rebuild */
  156. #define VOW_GOTNEWREAD_BIT      29
  157. #define VOW_GOTNEWREAD_MASK     (1L<<29)
  158.  
  159. /* owner is suspended, and message is printed */
  160. #define VOW_SUSPENDED_BIT       31
  161. #define VOW_SUSPENDED_MASK      (1L<<31)
  162.  
  163. #endif
  164.  
  165.